package com.lucifer.cloud.boot.blog.chat.support.voice;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author lucifer
 * @date 2025/3/21 13:00
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ZhiPuAiVoiceResponse {

    private String id;
    private String model;
    private List<Choice> choices;
    private Usage usage;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Choice {
        private String finish_reason;
        private int index;
        private Message message;

        @Data
        @Builder
        @AllArgsConstructor
        @NoArgsConstructor
        public static class Message {
            private String content;
            private String role;
            private Audio audio;
        }

        @Data
        @Builder
        @AllArgsConstructor
        @NoArgsConstructor
        public static class Audio {
            private String id;
            private String data;
            private String expires_at;
        }
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Usage {
        private int completionTokens;
        private int promptTokens;
        private int totalTokens;
    }
}
